package com.hutianao.gqgl.information.harbor.control;


import com.hutianao.gqgl.information.harbor.entity.SearchHarborEntity;
import com.hutianao.gqgl.information.harbor.service.HarborService;
import com.hutianao.gqgl.mybatis.entity.CoalHarborEntity;
import com.hutianao.gqgl.mybatis.flexigrid.PaddingEntity;
import com.hutianao.gqgl.mybatis.flexigrid.PadingRstType;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
@RequestMapping("/information/coalHarbor")
public class harborController {
    private Logger logger = LogManager.getLogger(this.getClass());
    @Resource
    private HarborService coalHarborService;

    @RequestMapping("/informationPage")
    public String informationPage(){
        return "information/coalHarbor/informationPage";
    }

    @RequestMapping("/queryCoalHarborInfoListByPage")
    @ResponseBody
    public PadingRstType<CoalHarborEntity> queryCoalHarborInfoListByPage(SearchHarborEntity search, PaddingEntity padding){
        logger.info(search);
        logger.info(padding);
        PadingRstType<CoalHarborEntity> padingRstType = coalHarborService.queryCoalHarborInfoListByPage(search,padding);

        return padingRstType;
    }


}
